<?php
class Admin_nav_model extends CI_Model {

    var $nav_view;
    var $nav_post_title = '增加文章';
    var $nav_post_type_title = '增加分类';
	
	function __construct()
    {
        // Call the Model constructor
        parent::__construct();

	}

	function get_nav($sel='')
	{
		$nav_array = array('admin'=>'首页', 'admin/post_type'=>$this->nav_post_type_title, 'admin/post'=>$this->nav_post_title, 'admin/post_list'=>'文章列表');
		
		foreach($nav_array as $href=>$nav_name)
		{
			$href_new = site_url('' . $href);
			//echo $href." ".$sel."<br/>";
			if($href == $sel)
				$this->nav_view .= '<li><a href="'.$href_new.'" id="sel">'.$nav_name.'</a></li>';
			else
				$this->nav_view .= '<li><a href="'.$href_new.'">'.$nav_name.'</a></li>';
		}

	   
		return $this->nav_view;
	}
}
